#include<cppr.hpp>
using namespace std;
class a
{
public:
    void show()
    {
        cout << "a show" << endl;
    }
};
class b : public a
{
public:
    void show()
    {
        cout << "b show" << endl;
    }
};

int main()
{
    a *p = new b; // 父类指针指向子类对象,打印的是父类的方法
    b *p1 = new b; // 子类指针指向子类对象,打印的是子类的方法
    p->show();
    p1->show();
    delete p;
    delete p1;
    return 0;
}
